package com.fzj.example.collection;

import java.util.*;

/**
 * ClassName: ListSetArrayDemo
 * date: 2019/11/7 9:40
 * Description: TODO
 *
 * @author fanzj@bonree.com
 * @since JDK 1.8
 */
public class ListSetArrayDemo {
    String[] arr=new String[]{"dfa","fdaf","fdasfadf"};
    //数组转化为List
    List<String> list=Arrays.asList(arr);
    //数组转Set,List转Set
    Set<String> set=new HashSet(list);
    //set转List
    List<String> list3=new ArrayList(set);
    //Set,List转数组
    String[] arr2= (String[]) set.toArray();
    String[] arr3= (String[]) list.toArray();

}
